************************* Use C-Pg Up to return *******************************
********************* Use Pg Up and Pg Dn to scroll ***************************
*************************** Use C-s to search *********************************
Copyright (C) 1993 Leon van Dommelen      There is no warranty on this software
Library letter: M (MINTED.ED)

				Mint

Based on mintref.doc, a document copyright (C) Russell Nelson.
See subject:	License, topic Freemacs License

This subject lists the Mint primitives.

See subject:	Modify, topic Basics of Mint	for an intro to Mint


Topics:				Description
-------------------------------------------------------------------------------

Mint Processing			Describes how strings are processed
- General			General rules
- Processor			How the processor is structured
- Algorithm			The algorithm used in processing strings
Mint Primitives			Build in Mint functions
- Intro				Notations
- Strings			String manipulation primitives
  - ds				Define String
  - rs				Restore String
  - es				Erase String
  - n?				Name exists?
  - ls				List Strings
  - mp				Make Parameter
  - gs				Get String
  - none			Default
  - go				Get One Character
  - gn				Get n Characters
  - fm				First Match
  - si				String Index
  - nc				Number of Characters
  - ==				Equality
  - a?				Alphabetically Ordered?
  - sa				Sort Ascending
  - bc				Base Conversion
- Arithmetic			Numerical primitives
  - ++				Add
  - --				Subtract
  - **				Multiply
  - //				Divide
  - %%				Modulo
  - g?				Greater
- Text Buffer			Text buffer primitives
  - ba				Buffer Allocate
  - bi				Buffer Insert
  - is				Insert String
  - tr				Translate to Mark
  - pm				Push/Pop Mark
  - sm				Set Mark
  - sp				Set Point
  - dm				Delete to Mark
  - rm				Read to Mark
  - rc				Read Count
  - mb				Mark Before?
  - lp				Look Pattern
  - l?				Look & Test
- Input				Input from keyboard and mouse
  - it				Input Timed
  - pp				Pick Position
- Display			Screen management
  - rd				Redisplay
  - xy				Position
  - ow				Over Write
  - an				Announce
- Variables			Basic editing variables
  - lv				Load Variable
  - sv				Store Variable
- DOS Interaction		System primitives
  - rf				Read File
  - wf				Write File
  - ff				Find Files
  - rn				Rename file
  - de				Delete File
  - ll				Load Library
  - sl				Save Library
  - ev				Environment
  - ex				Execute Program
  - ct				C Time
  - db				Debug
  - hl				Halt
- Syntax Table			Define what is a word
  - st				Syntax Table
- Spell				Spell checker
  - sc				Spell Check


			  = Mint Processing =
-------------------------------------------------------------------------------

This topic discusses how Mint code is processed.

General:
--------

The MINT processor manipulates strings of characters.

Certain combinations of strings, namely
	#(argument,argument,...)
and
	##(argument,argument,...)
invoke functions. Arguments are evaluated from left to right.  The first
argument is assumed to be the name of a function.  The result of the
invocation is computed by supplying the remaining arguments as arguments
to the function.

If the function was the single sharp #(...) form, the result is rescanned;
otherwise the value is accepted without rescanning.

The form
	(...)
where the interior string contains balanced parentheses, protects the interior
string from evaluation.  The processor simply strips the outer parentheses and
accepts the interior unscanned.

For example, since ** is the multiply function and ++ the addition function,
the string
		((3+4))*9 = #(**,#(++,3,4),9)
evaluates to
		(3+4)*9 = 63
Note that 3+4 is to be surrounded by parentheses.  To prevent them from
being interpreted as protection parentheses, they must themselves be
surrounded by a pair of protection parentheses.

Processor:
----------

The Mint processor uses three structures:
	the active string
	the neutral string
	the scan pointer
A convenient visualization is to think of the neutral string on the left,
the scan pointer in the middle, and the active string on the right:
	<neutral string>^<active string>
The scan pointer always points at the left of the active string, looking at
the first character.

Normally characters move from the active to neutral string, where they are
accumulated until there are enough to form all the arguments of some function.
Then the function is evaluated and the result put back in the active or neutral
string according to the function type.

Algorithm:
----------

The algorithm consists of 10 numbered steps.  When the processor is executed,
it begins by going to step 1.  Throughout the algorithm there are mentions of
marking the neutral string in various ways.  Think of these markers as flags
attached to the affected characters (of course, the markers are accompanied by
pointers, pointing backwards though the neutral string).


1. Initialize
Clear the processor: empty the neutral string, delete any contents of the
active string. Fill the active string with #(k) #(d,#(g)) if there is no key
waiting, otherwise just #(d,#(g)) Set the scan pointer to the first character
of the active string

2. Check for more
If the active string is empty, return to step 1. Note that the neutral string
may still contain characters.

3. Check for fillers
If the character right of the scan pointer is a horizontal tab, carriage
return, or line feed, delete it, advance the scan pointer, and return to
step 2.

4. Check for (
If the character under the scan pointer is a left parenthesis, delete it and
scan forward until the matching right parenthesis is found.  After all of the
intervening characters have been moved without change to the neutral string,
the right parenthesis deleted, and the scan pointer moved to the character
following the right parenthesis, return to step 2.  If the matching right
parenthesis cannot be found, go back to step 1 without giving an error.

5. Check for ,
If the character under the scan pointer is a comma, delete it, mark the
rightmost character of the neutral string as the end of one argument, advance
the scan pointer, and return to step 2.

6. Check for #(
If the character under the scan pointer is a sharp sign and the next character
is a left parenthesis, an active function is beginning.  Delete the sharp sign
and the left parenthesis, advance the scan pointer beyond them, mark the
rightmost character of the neutral string as the beginning of both an argument
and an active function, and return to step 2.

7. Check for ##(
If the character under the scan pointer is a sharp sign and the next two
characters are another sharp sign and a left parenthesis, a neutral function is
beginning.  Delete the ##(, advance the scan pointer beyond them, mark the
rightmost character of the neutral string as the beginning of both an argument
and a neutral function, and return to step 2.

8. Check for #
If the character under the scan pointer is a sharp sign that did not meet the
conditions of step 6 or 7, move it to the right end of the neutral string,
advance the scan pointer, and return to step 2.

9. Check for )
If the character under the scan pointer is a right parenthesis, a function is
ending.  Delete the right parenthesis, advance the scan pointer, and mark the
rightmost character of the neutral string as the end of an argument and the end
of a function.  Now the neutral string from the rightmost begin function marker
to the just inserted end function marker constitutes a MINT function
invocation.  (If there is no begin function marker in the neutral string,
return to step 1 without giving an error.)  The first argument is assumed to be
the name of a MINT function.  If the argument is two characters long, and is
the name of a built-in function, that function is evaluated with the given
arguments: extra arguments are ignored and missing ones are automatically
supplied as the null string.  If the function is not built-in, a default
built-in function is executed.  The result of the function is catenated to the
right of the neutral string if the function was marked as neutral and to the
left of the active string if marked active; in the latter case, the scan
pointer is reset to the leftmost character of the new active string.  Check the
head of the keyboard buffer.  If the key is the break key for your system
(Z-100 uses Shift-Help, IBM-PC uses Ctrl-Break) then input that key and go to
step one, otherwise return to step 2.

10. Accept the character
If the character under the scan pointer did not meet any of the conditions of
steps 3 through 9, attach it to the right of the neutral string, delete it from
the active string, advance the scan pointer, and return to step 2.

			= Mint Primitives =
-------------------------------------------------------------------------------

This topic lists the build in Mint functions or primitives.

Intro:
------

 	The MINT functions are listed here in their active forms, but each can
be called in neutral mode as well.  The value of a function is always a string;
any function, particularly those whose most important activity is a side
effect, might return nil (the null string).


Strings:
--------

	In addition to the structures mentioned earlier, the processor can
store strings in an area called string storage.  Each string has three parts: a
string name, which may be any string whatsoever; a string body, which may also
be any string; and a string pointer, which initially points just in front of
the first character of the string body.  The string pointer always points just
before the body, just after it, or between two characters; that is, it always
points into a gap between characters.  String bodies may include ordinal
parameter markers intermixed with their characters.


ds:

	Define String
	Returns nil

	#(ds,N,B) creates a string with name N and body B. It puts the string
pointer at the start, just before the first character of B.  If there is a
string with name N already, its previous body and string pointer are lost.


rs:

	Restore String
	Returns nil

	#(rs,N)	restores the string pointer of the string named N to its
initial position just before the first character of the string.


es:

	Erase String
	Returns nil

	#(es,N1,N2,...) erases the strings named N1, N2, ..., from string
storage.


n?:

	Name exists?

	#(n?,F,Y,N) tests for the existence of a string of name F and returns Y
if found or N if not found.


ls:

	List Strings

	#(ls,S,P) returns a list of all the strings whose names start with P.
If P is missing, all strings are listed.  The string names are separated by the
string S.


mp:

	Make Parameter
	Returns nil

	#(mp,N,P1,P2,...) creates parameter markers in the string of name N.
The non-nil arguments P1,P2..., are processed in turn from left to right (nil
arguments are ignored).  Argument Pi is processed in the following way.  The
body of string N is scanned from left to right for the first substring exactly
equal to Pi.  The matching substring must not contain any already existing
parameter markers.  If it does not, the substring is taken out of the string
body and an ordinal parameter marker numbered i replaces it.  The matching
process begins again at the character following the marker.  The string pointer
is replaced at the start of the string when the searching is finished.  A
string may be searched more than once.

	Parameter markers are represented by characters in the range 128..255.
Parameter marker 128 is ignored, 129 corresponds to P1, 130 corresponds to P2,
etc.  The standard symbols for P1, P2, ... are in #(Farglist), and are SELF for
P1, arg1 for P2, arg2 for P3, etc.

	If N contains the ASCII character with code 128, `€', it is lost.


gs:

	Get String

	#(gs,N,A0,A1,A2,...) returns the body of the string of name N with its
parameter markers filled in.  All P1 parameters are filled with A0, all P2
parameters with A1, and so on.

	Excess arguments are ignored and missing ones are supplied with the
null string.


none:

	Default

	#(N,A1,A2,...) returns the body of the string of name N with its
parameter markers filled in.  All P1 parameters are filled with the name N, all
P2 parameters with A1, P3 with A2, and so on.

	Excess arguments are ignored and missing ones are supplied with the
null string.

	Equivalent to #(gs,N,N,A1,A2,...).


go:

	Get One Character

	#(go,N,Z) returns the character immediately following the string
pointer in the string N.  The string pointer is advanced just beyond the
selected character.

	If, however, the string pointer is already at the right end of the
string, argument Z is returned instead.  Z is returned in active mode
regardless of the mode of the function call.


gn:

	Get n Characters

	#(gn,N,n,Z) returns the next n characters of the string N starting at
the string pointer.  The string pointer is moved past the selected substring to
the first unread character.

	If n is zero, it returns nil and the pointer does not move.

	If n exceeds the number of characters available, all available
characters are returned, unless there are none, in which case Z is returned
active.

	If n is negative, all characters are returned unless there are none, in
which case Z is returned active.


fm:

	First Match

	#(fm,N,X,Z) searches the string N from the string pointer onward for a
substring containing no parameter markers and exactly matching argument X.

	If a match is found, it returns the substring from the string pointer
to the character immediately preceding the match.  The string pointer is moved
past the match.

	If no match is found, the argument Z is returned in active mode
regardless of the mode of the function call, and the string pointer is
stationary.


si:

	String Index

	#(si,N,C) returns, for each character in string C, the n-th character
of the string of name N, where n is the numerical code for the character of C.
If there is no n-th character in N, it returns the character from C unchanged.


nc:

	Number of Characters

	#(nc,A) returns the number of characters in string A.


==:

	Equality

	#(==,A,B,T,F) returns T if string A is EXACTLY equal to string B, or
F otherwise.


a?:

	Alphabetically Ordered?

	#(a?,A,B,Y,N) returns Y if A is alphabetically less than or equal to B
and N otherwise.


sa:

	Sort Ascending

	#(sa,A,B,C,...) returns the strings A, B, C, etc. in alphabetic
ascending order, separated by commas.


bc:

	Base Conversion

	#(bc,V,F,T) converts the value V from the base F to the base T.
F defaults to ASCII and T to decimal.  To specify a different base for either,
use one of the characters below:

	  Character	Meaning
	   a or A	ASCII character.
	   d or D	decimal number.
	   h or H	hexadecimal number.
	   o or O	octal number.
	   b or B	binary number.


Arithmetic:
-----------

	MINT performs arithmetic on strings of decimal characters.  The
arithmetic value of a string is given by the longest suffix of the string that
can be described exactly as all decimal digits preceded by at most one plus or
minus sign.  Thus the value of 3 is three; of a-4 is negative four; of ++++200
is two hundred; and of the null string and of abc zero.  The null string acts
as zero in arithmetic operations.

	The result of an arithmetic operation is a decimal string with no
leading zeros or plus signs for positive results and with zero represented
as 0.  The maximum value of the result is 32767; larger values return
decremented by 65536.


++:

	Add

	#(++,A,B) returns the sum of the arithmetic values of A and B.  Any
nonnumeric prefix of A is prefixed to the result.  Any prefix of B is lost.


--:

	Subtract

	#(--,A,B) returns the arithmetic value of B minus that of A.  Any
nonnumeric prefix of A is prefixed to the result.  Any prefix of B is lost.


**:

	Multiply

	#(**,A,B) returns the arithmetic value of B times that of A.  Any
nonnumeric prefix of A is prefixed to the result.  Any prefix of B is lost.


//:

	Divide

	#(//,A,B) returns the arithmetic value of A divided by that of B.  Any
nonnumeric prefix of A is prefixed to the result.  Any prefix of B is lost.

	The division operation is done in integer mode, and only the integral
portion of the quotient is retained.


%%:

	Modulo

	#(%%,A,B) returns the arithmetic value of A modulo that of B.  Any
nonnumeric prefix of A is prefixed to the result.  Any prefix of B is lost.


g?:

	Greater

	#(g?,A,B,T,F) returns T if the arithmetic value of A is greater than
that of argument B, or F otherwise.



Text Buffer:
------------

	In addition to the active string, neutral string, and named string
storage, Emacs has a text buffer.  This buffer is capable of holding any
string of characters.  Characters in the range zero through 127 may be viewed
directly, while characters in the range 128 through 255 are viewed as the
inverse video representation of the character that is 128 lower in value,
depending on your hardware.

	The two character combination Carriage Return followed by Line Feed is
considered a newline character, distinct from all other characters.  Emacs
considers the two characters to be indivisible.  Any operation performed on one
is performed on the other.  Usually a newline character may be considered as
one character, except that ##(rm,>) will return a newline as two characters.

	The text buffer is most often accessed at a particular position called
the point.  The point is the place at which all insertions and deletions take
place.  The cursor on the screen is placed at the point.

	A mark is another position in the file, used to delimit block
operations, and can be used to set the point.

	A mark is specified by a ASCII character.  Emacs defines certain
marks, called system marks, to have a special value.  The meanings of all the
valid marks are given in a table below.  Any mark, system or user, may be used
when a mark is called for.

	All the user marks are initially set to the beginning of the file.
Once a mark is set, the mark "sticks" to the character at the right of the
mark, or eof if that's the case.  Therefore, the user marks migrate to the end
of the file.

	The global user marks are always available for use.  The number of
global marks is controlled by the value of a negative argument to the
primitive `pm'.  For example, `#(pm,-3)' creates three global marks - @, A,
and B.  Creating global marks destroys all local marks.

	The local user marks are arranged as a stack.  The primitive `pm' is
used to push and pop marks.  If you wish to use two local marks, then you
would execute `#(pm,2)'.  This creates two new marks, 0 and 1, which both have
the value of the current point unless the current window is not yet drawn. When
you are finished using the marks, you would execute `#(pm)'.  You may use at
most ten local user marks at once.

	Mark Character	Meaning
	--------------	------------------------------------------------
	@ through Z	Global user marks
	0 through 9	Local user marks.
	<		Past the character left of the point.
	>		Past the character right of the point.
	{		Past any word characters left of the point.
	}		Past any word characters right of the point.
	-		Past any non-word characters left of the point.
	+		Past any non-word characters right of the point.
	[		The beginning of the file.
	]		The end of the file.
	^		The beginning of the line.
	$		The end of the line.
	.		The point.


ba:

	Buffer Allocate

	#(ba,N) creates and/or selects buffers.

	If N is zero, it creates and selects a new buffer and returns the new
buffer's number.  If there is not enough memory for a new buffer, it returns 0.

	If N is positive, then the buffer numbered N is selected and it returns
N.  If there is no buffer numbered N, it returns 0.

	If N is negative, it returns the number of the currently selected
buffer, which remains selected.


bi:

	Buffer Insert

	#(bi,N,M,Y,E) inserts all the text from buffer N between buffer N's
point and buffer N's mark `M' into the current buffer.  Returns Y on success.
If the buffer cannot hold the entire string, the string is not inserted;
instead, the argument E is returned active.


is:

	Insert String
	Returns nil on success

	#(is,S,E) inserts the string S before the point.  If the buffer cannot
hold the entire string, the string is not inserted; instead, the argument E is
returned active.


tr:

	Translate to Mark
	Returns nil

	#(tr,M,S) translates the characters in the region terminated by mark M
according to the table given by string S.  If a character's value is larger
than the size of S, then it remains untranslated.  Newline always remains
untranslated.  Unlike the si function, S is the table, not a name for it.


pm:

	Push/Pop Mark
	Returns nil on success

	#(pm,S,E) allocates marks.

	If the numeric argument S is positive, S local marks are allocated.
They are initialized to point provided that the current window has been drawn.

	If S is negative, -S permanent user marks are allocated and all local
marks are destroyed.

	If the numeric argument S is zero, the current local marks are
deallocated, and any previous local marks become active again.

	If stack overflow or underflow occurs, the argument E is returned
active.


sm:

	Set Mark
	Returns nil

	#(sm,M,V) sets the mark M to the mark V.  If V is nil, the point is
used.  Note that newly created marks are also initialized to point.  Do not set
marks on [: the position before [ is not in the buffer.


sp:

	Set Point
	Returns nil

	#(sp,M) sets the point to the mark M.   Argument M may be a single mark
or a sequence of marks: #(sp,MN) is equivalent to #(sp,M)#(sp,N).


dm:

	Delete to Mark
	Returns nil

	#(dm,M) deletes all text between the point and the mark M.  Deleting
large amounts of text can take a long time, but #(dm,]) is optimized when the
point is at the beginning of file.


rm:

	Read to Mark

	#(rm,M,V) returns the characters between the point and the mark M.  If
there is not enough string space, argument V is returned active.


rc:

	Read Count

	#(rc,M) returns the number of characters between the point and mark M.


mb:

	Mark Before?

	#(mb,M,Y,N) returns Y if mark M is before the point, and N if it is
after the point.


lp:

	Look Pattern
	Returns nil

	#(lp,S,N,R,F) sets the pattern to search for to S.  S should not
contain more than 63 characters.

	If F is not nil, then case is folded, i.e. fOo matches FOO, fOO, FOo,
and foo.

	If R is not nil, then the pattern is may contain regular expressions.
If the regular expression is in error, then N is returned active.

	Regular expression characters:
	^	matches the beginning of a line.
	$	matches the end of a line.
	.	matches any single character.
	[,;]	matches , or ; (example).
	[a-z]	matches the letters from a to z (example).
	[^a-z]	matches anything but a-z (example).
	*	causes the previous character to be matched zero or more times.
	\	causes the following character to have no special meaning.


l?:

	Look & Test

	#(l?,S,E,F,L,Y,N) searches from mark S to mark E for the pattern
specified by function lp.

	If pattern S is found, mark F is set before the found string, mark L is
set behind the found string, and argument Y is returned.  If F or L are nil, no
mark is set to that position.

	If S is not found, neither mark is changed, and argument N is returned.


Input:
------


it:

	Input Timed

	#(it,T) gets a key from the keyboard. If no key is available after T
hundreths of a second, it returns `Timeout'.

	If T is zero, the key remains in the input buffer and the next #(it)
will return the same key. If T is negative, #(it) waits the maximum time, 11
minutes.

	Note that keys should usually be input using the #(g) defined function.

	Following is a list of key names returned by #(it).  Emacs is written
to be as machine independent as possible.  Therefore, your Emacs implementation
may not implement all of the listed keys.  If the key has a shifted version,
then the key name is preceded by `S-' unless it is a standard ASCII character.
For example, C-_ is not returned as C-S--.  If your implementation has a Meta
key (sometimes called Alt), then the key name from the list below (as well as
those above) is preceded with `M-'.  Note that other Emacs' define control and
meta keys to be C-M-x whereas Freemacs defines control and meta keys to be
M-C-x.

	C-@	Control-@
	C-A	Control-A
	...	The rest of the control characters are fashioned similarly.
	C-_	Control-_
	 	Space (a single space)
	!	Bang
	...	The rest of the printables just return themselves
	Delete

	BackSpace	Not the same as C-h
	Tab		Not the same as C-I
	Return		Not the same as C-m
	Escape		Not the same as C-[
	Enter		Not the same as C-m
	Help

	F0,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12	Etc.

	Ins
	Del
	I Chr
	D Chr
	Ins Line
	Del Line

	Up Arrow
	Down Arrow
	Right Arrow
	Left Arrow

	Home
	End
	Pg Up
	Pg Dn
	Break
	Sys Req

	KP+,KP-,KP.	Keypad keys
	KP0,KP1,KP2,KP3,KP4,KP5,KP6,KP7,KP8,KP9

	Left Down	Mouse buttons
	Left Up
	Right Down
	Right Up
	Middle Down
	Middle Up


pp:

	Pick Position

	#(pp) returns the position of the mouse pointer.  The position is
returned as the numbers of the column and row, separated by a comma.  In other
words, it returns the equivalent of #(lv,cs)(,)#(lv,cl) for the pointer instead
of for the cursor.


Display:
--------

rd:

	Redisplay
	Returns nil

	#(rd,F) causes the screen to be updated.  The lines on the screen which
do not match the lines in the text buffer are redrawn. If argument F is not
nil, the screen is completely redrawn.  If the input buffer is not empty, that
is, if a key is waiting to be executed, redisplay is not performed.  This
prevents the input buffer from overflowing.


xy:

	Position
	Returns nil

	#(xy,X,Y) sets the screen location at which the next #(ow) overwrite
will occur. X is the indentation, and Y down from the top of the screen.


ow:

	Over Write
	Returns nil

	#(ow,S) overwrites the screen with the string S.  Multiple overwrites
are equivalent to a single overwrite.  That is, #(ow,A)#(ow,B) is equivalent to
#(ow,AB). Writing a crlf fills the current screen line to the end with the
background color and starts the next line. Writing a single 
 (i.e. C-m) clears
the current screen line.  The next #(rd) redisplay will erase all overwrites.


an:

	Announce
	Returns nil

	#(an,L,,R) displays the string L on the bottom line of the screen
followed by string R, with the cursor in between.

	#(an,L,F) where F is not nil displays string L on the last line of the
current window (mode line) without positioning the cursor.

	Guidelines for announcing things with #(an):
	----------------------------------------------------------------------
	If the string ends in ..., you are expected to wait for the operation
	  to complete.
	If the string ends in ?, you are expected to type a single character.
	  If a choice is not given, then you must type `y' or `n'.
	If the string ends in !, an error has occurred.
	If the string ends in :, you are expected to type a string terminated
	  by return. (There may be a default terminated in ? after the :)
	If the string doesn't end in one of the above, it is advisory and
	  ignorable.


Variables:
----------


lv:

	Load Variable

	#(lv,F) returns the value of the variable F.  A table of allowed F
values and returned values follows:

	 F			Value returned
	 --------------------	--------------
	 as (Auto Save)		Auto save counter (0..65535)
	 bc (Background Color)	Background color (0..7), initially 0
	 bl (Bottom Line)	bottom line of current window (1..23)
	 bo (Background Origin)	Background color (0..7), originally
	 bs (Bot Scroll)	percentage of bot screen that scrolls (0..100)
	 cd (Current Directory)	Current DOS directory
	 cl (Current Line)	number of current line (1..32767)
	 cn (Computer Name)	currently, either `IBM-PC' or `Z-100'.
	 cs (Column on Screen)	column on screen (1..32767)
	 cw (Current Window)	window currently in use (1..2)
	 fc (Foreground Color)	Foreground color (0..15), initially 7
	 fo (Foreground Origin)	Foreground color (0..15), originally
	 im (Inverse Mark)	Mark that is showing inverse video.
	 is (Inhibit Snow)	inhibit snow on CGA (0..1)
	 lc (Left Column)	Left Column on screen (1..)
	 mb (Modified Buffer)	flag, zero if buffer not modified (0..2)
	 nl (Number of Lines)	number of lines (1..32767) 
	 ow (Other Window)	buffer being displayed in "other" window (0..)
	 pb (Percentage Before)	Percentage of text buffer before point. (0..100)
	 rs (Row on Screen)	row on screen (-32768..32767)
	 tc (Tab Columns)	number of columns per tab (2,4,8,16)
	 tl (Top Line)		top line of current window (1..23)
	 ts (Top Scroll)	percentage of top screen that scrolls (0..100)
	 vn (Version Number)	current version number.
	 ws (Whitespace Showing)redisplay shows whitespace (0..1)


sv:

	Store Variable

	#(sv,F,V) sets the value of the variable F to V.  A table of F values
and corresponding values set follows:

	 F			Value set
	 --------------------	--------------
	 as (Auto Save)		Auto save counter (0..65535)
	 bc (Background Color)	Background color (0..7) initially 0
	 bl (Bottom Line)	bottom line of current window (1..23)
	 bs (Bot Scroll)	percentage of bot screen that scrolls (0..100)
	 cd (Current Directory)	Current DOS directory
	 cl (Current Line)	number of current line (1..32767)
	 cs (Column on Screen)	the point is moved to column on screen (1..32767)
	 cw (Current Window)	window currently in use (1..2)
	 fc (Foreground Color)	Foreground color (0..15) initially 7
	 im (Inverse Mark)	Mark to inverse video to.
	 is (Inhibit Snow)	inhibit snow on CGA (0..1)
	 lc (Left Column)	Left Column on screen (1..)
	 mb (Modified Buffer)	flag, zero if buffer not modified (0..2)
	 ow (Other Window)	buffer being displayed in "other" window (0..)
	 rs (Row on Screen)	moves the cursor to the	Vth row on screen (1..)
	 tc (Tab Columns)	number of columns per tab (2,4,8,16)
	 tl (Top Line)		top line of current window (1..23)
	 ts (Top Scroll)	percentage of top screen that scrolls (0..100)
	 ws (Whitespace Showing)redisplay shows whitespace (0..1)
	 none of the above	number of current line (1..32767)


Explanation of variables:

im (Inverse Mark)	text to show in inverse video
	If `im' is set to anything other than `.', then redisplay will cause
the text between the supplied mark and point to be displayed in inverse video.

bc (Background Color)	background color (0..7), initially 0
fc (Foreground Color)	foreground color (0..15), initially 7
	Newly drawn text will be displayed with these two colors.

bo (Background Origin)	background color (0..7), background color on entry.
fo (Foreground Origin)	foreground color (0..15), foreground color on entry.
	These are derived from the attribute of the character at the cursor
position.  Sampled when you first enter Freemacs and after #(ex).  In other
words, when you suspend then re-enter Freemacs, these colors are sampled again.
Cannot be set.

vn (Version Number)	current version number.
	If loaded, `vn' will return the current version number.  Cannot be set.

cn (Computer Name)	currently, either `IBM-PC' or `Z-100'.
	If loaded, `cn' will return the name of the computer that Freemacs is
running on.  Cannot be set.

pb (Percentage Before)	percentage of text buffer before point. (0..100)
	If loaded, `pb' will return the percentage of the text buffer that is
before the point.  Cannot be set.

ow (Other Window)	buffer being displayed in other window (0..)
	When set to a number other than zero, then that buffer will be
displayed in the other window.  If you load this variable, then it is the
number of the buffer being displayed in the other window, or 0 if there is only
one window.

cw (Current Window)	window currently in use (1..2)
	When set, `cw' will determine which window the next redisplay will use.
When loaded, `cw' will return the number of the window being used for
redisplay.  If #(lv,ow) is zero, then #(lv,cw) will always be 1.  To switch to
the other window, use
	#(ba,#(lv,ow))#(sv,cw,#(==,#(lv,cw),1,2,1))
If you perform a rewrite in between,
	#(ba,#(lv,ow))#(rd)#(sv,cw,#(==,#(lv,cw),1,2,1))
the new window's buffer is also put in the old window.

nl (Number of Lines)	number of lines (1..32767)
	Total number of text lines in the buffer.  Cannot be set, only loaded.

rs (Row on Screen)	row on screen (-32768..32767)
	When set, `rs' will determine the row on the screen that the point is
on.  When loaded, will return the row on the screen that the point is on.  If
#(lv,tl) <= #(lv,rs) <= #(lv,bl) then the point is on the screen.  Otherwise,
the point is below or above the screen respectively.  After a redisplay, the
point will always be on the screen.

cs (Column on Screen)	column on screen (1..65535)
	If loaded, will return the column on the screen of point, regardless of
when the last redisplay was done.  If set, the point will positioned to that
column, interpreting tab characters.  If the line is not that long, the point
will be at the end of the line.  (Unlike rs, cs does not correct for scrolling:
the physical screen location is less by lc-1).

tc (Tab Columns)	number of columns per tab (2,4,8,16)
	Each tab character advances the cursor to the next tab stop.  Each tab
stop is #(lv,tc) characters apart.

tl (Top Line)		top line of current window (1..)
bl (Bottom Line)	bottom line of current window (1..)
	If loaded, will return the position of the current window on the screen.
Can only set the bottom line of the top window, or the top line of the bottom
window.  Any other attempt to set will be ignored.  It will not allow you to
decrease the window size of the other window to less than one line.

lc (Left Column)	Left Column on screen (1..)
	If set, `lc' will set the column shown in the left hand edge of the
screen.  This will have no effect if it would result in the point not being
shown on the screen.  In other words, redisplay will change `lc' if needed.

mb (Modified Buffer)	flag, zero if buffer not modified (0..1)
	Can be loaded or set.  Whenever the buffer is changed by #(dm), #(rf),
#(is), #(tr), or #(bi), the flag is set to 1.  If the flag is set to 2, then
the buffer is read-only and cannot be modified.

ts (Top Scroll)	percentage of top screen that scrolls (0..100)
bs (Bot Scroll)	percentage of bot screen that scrolls (0..100)
	If possible, this percentage of the screen will be shown above or below
the point.

ws (Whitespace Showing)	redisplay shows whitespace (0..1)
	If `ws' is set, then the Freemacs redisplay algorithm will show
trailing whitespace using bullet (space) or diamond (tab) characters.

is (Inhibit Snow)	inhibit snow on CGA (0..1)
	Some CGA cards, most notably IBMs, will produce video interference if
this flag is set to a zero.

as (Auto Save)		Auto save counter (0..65535)
	If set to a non-zero value, Freemacs will execute #(Fauto-save) after
that many characters have been typed.  If set to a zero value, then Freemacs
will never execute #(Fauto-save) automatically.

cl (Current Line)	number of current line (1..32767)
	If set, the point is positioned to that line in the text buffer.  If
loaded, the line number that point is on will be returned.


DOS Interaction:
----------------

rf:

	Read File

	#(rf,N) reads the file N into the text buffer to the left of the point.
If no error occurs, the null string is returned.  If an error occurs, an error
message is returned.  The possible messages are:
	File not found
	File too large
	End of file


wf:

	Write File

	#(wf,N,M) writes the text between cursor and mark M to file N.  If no
error occurs, the null string is returned.  If an error occurs, an error
message is returned.  The possible messages are:
	Directory full or bad filename
	Directory Full
	Disk Full


ff:

	Find Files

	#(ff,N,S) returns the names of all the files that match argument N.
Wildcards are allowed.  The file names are separated by S.


rn:

	Rename file

	#(rn,O,N) renames file O to name N.  Wildcards are not allowed.  If an
error occurs, an error message is returned.  The possible messages are:
	Rename error


de:

	Delete File

	#(de,N) deletes the file N.  Wildcards are not allowed.  If an error
occurs, an error message is returned.  The possible messages are:
	File not found


ll:

	Load Library

	#(ll,A) retrieves all of strings stored in the file A.  The strings are
brought back to string storage.  If some of the strings are already in string
storage, their values are overwritten. If an error occurs, an error message is
returned.  The possible messages are:
	File not found


sl:

	Save Library

	#(sl,A,F1,F2,...) stores the strings named F1, F2, ... in the disk file
A. If an error occurs, an error message is returned.  The possible messages
are:
	Directory full or bad filename


ev:

	Environment
	Returns nil

	#(ev) copies all the string in the DOS environment to Mint strings that
start with `env.'. In addition, the arguments passed to emacs on the run line
are defined as `env.RUNLINE', the switch character used by MS-DOS is defined as
`env.SWITCHAR', and under DOS 3.x, the full pathname of emacs.exe is
`env.FULLPATH'.


ex:

	Execute Program

	#(ex,F,A,I,O,E) executes program F, which must be a fully qualified
pathname with an extension.  The arguments to the program are in A.  If I is
non-nil, then stdin is redirected to I.  If O is non-nil, then stdout is
redirected to O.  If E is non-nil, then stderr is redirected to E. Returns the
DOS result code or 2 if program F cannot be found.


ct:

	C Time

	#(ct) returns the current time and date in the form `Mon Nov 10
00:23:47 1988' regardless of the country setting.
	#(ct,F) returns the time and date associated with the last write to the
file F.


db:

	Debug

	#(db) executes an interrupt 3 which should enter a debugger.  Do not use
this if you haven't run DEBUG first!


hl:

	Halt

	#(hl,N) exits Emacs to MS-DOS with a return code of N (decimal).  Emacs
will halt with a return code of 1 if `emacs.ed' cannot be found.


Syntax Table:
-------------


st:

	Syntax Table
	Returns nil

	#(st,N) sets the syntax table to the string of name N.  The syntax
table determines whether a particular ASCII character is considered to be a
word character or a non-word character.  The first character in string N gives
the syntax for the ASCII null character,  the 33th character in the string
gives the syntax for the space character, and so on.  If the body of string N
is less than 256 characters in length, those characters that fall off the right
end have random syntax.

	If no syntax table is selected, the syntax reverts to the default: 0-9,
A-Z, and a-z are the only word characters.  The newline character is neither a
word nor a non-word character.

	The characters in the body of string N are interpreted as bit fields.
If the leading bit is zero, the corresponding ASCII character is considered to
be a non-word character, else a word character.


Spell:
------

sc:

	Spell Check

	#(sc,W,F) invokes function code F of the spell checker, if resident.
The value returned is a decimal error code or a word count.

Function codes:
	0 spell checks word W
	1 adds word W to the dictionary
	2 returns the number of words in the dictionary
	3 writes the speller to file W
	4 empties the dictionary.
	5 returns the maximum number of words in the dictionary

Errors codes:
	 0 No error (except function code 2: zero words in dictionary)
	-1 Speller not installed
	-2 illegal function call was made
	-3 word was mis-spelled
	-4 word too long to add to dictionary or to spell check
	-5 dictionary is full!
	-6 disk full, speller not saved

************************* Use C-Pg Up to return  ******************************
************************* Use Pg Up to scroll up ******************************
*******************************************************************************
